import App from './App'
import uvUI from '@/uni_modules/uv-ui-tools'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
Vue.use(uvUI);
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
import TabBar from "@/components/TabBar/TabBar.vue";
import Tabs from "@/components/Tabs/Tabs.vue";
import WeekCalendar from "@/components/WeekCalendar/WeekCalendar.vue";
import MonthCalendar from "@/components/MonthCalendar/MonthCalendar.vue";
import Steps from "@/components/Steps/Steps.vue";
import TabsTop from "@/components/TabsTop/TabsTop.vue";
import Stage from "@/components/Stage/Stage.vue";
import SignBtn from "@/components/SignBtn/SignBtn.vue";
import Bind from "@/components/Bind/Bind.vue";
import Upload from "@/components/Upload/Upload.vue";
import Signature from "@/components/Signature/Signature.vue";
import Upgrade from "@/components/Upgrade/Upgrade.vue";


export function createApp() {
  const app = createSSRApp(App)
  app.use(uvUI);
  app.component("g-tab-bar", TabBar); // switchBar 组件
  app.component("g-tabs", Tabs); // tab标签页组件
  app.component("g-week-calendar", WeekCalendar); // 周日历组件
  app.component("g-month-calendar", MonthCalendar); // 月日历组件
  app.component("g-steps", Steps); // 步骤条组件
  app.component("g-tabs-top", TabsTop); // tab标签页组件2
  app.component("g-stage", Stage); // 步骤组件
  app.component("g-sign-btn", SignBtn); // 签到组件
  app.component("g-bind", Bind); // 绑定组件
  app.component("g-upload", Upload); // 上传组件
  app.component("g-signature", Signature); // 签名组件
  app.component("g-upgrade", Upgrade); // 升级组件
  return {
    app
  }
}
// #endif